package com.wchat.service;


public interface AuthUtilService {
    String sessionKey = "userInfo";
    String requestTokenKey = "requestToken";

    class AuthInfo {
        public Integer userId;
        public UserType userType;
        public Long nonce;
        public Boolean authed;
        public Boolean changed;
    }

    enum UserType {
        USER
    }


    String createJwt(AuthInfo authInfo);

    AuthInfo decryptFromJwt(String token);

    String createJwt(AuthInfo authInfo, Integer expireTimeInMinutes);

    AuthInfo createAuthInfo(Integer userId,UserType userType );
}
